﻿using System;
using System.Collections.Generic;
using System.Configuration;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
using Karbel;

namespace TIMA.DevTeam
{
    public class Data
    {
      public static DataManager DM { get; set; }

        public static void Init(string ConnectionString)
        {
            DM = new DataManager(ConnectionString);

            PropertyInfo[] props = Properties.Settings.Default.GetType().GetProperties();
            foreach (PropertyInfo prop in props)
            {
                SettingsProperty sett = Properties.Settings.Default.Properties[prop.Name];
                if (sett != null)
                {
                    Properties.Settings.Default[prop.Name] = ConnectionString;
                }
            }
        }
    }
}
